/* 图片放大 */
.img-zoom {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    touch-action: none;
    transition: opacity 0.4s ease-in-out;
    -webkit-transition: opacity 0.4s ease-in-out;
}

.img-zoom.active {
    display: flex;
    opacity: 1;
}

.img-zoom .zoom-img {
    max-width: 90%;
    max-height: 90%;
    transition: transform 0.4s ease-in-out;
    -webkit-transition: transform 0.4s ease-in-out;
    transform: scale(0.9);
    -webkit-transform: scale(0.9);
    border-radius: 8px;
}

.img-zoom.active .zoom-img {
    transform: scale(1);
    -webkit-transform: scale(1);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
}

button.nav-btn, button#close-btn {
    position: fixed;
    width: 50px;
    height: 70px;
    border-radius: 10px;
    font-size: 30px;
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 9999;
    background-color: rgba(100, 100, 100, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: opacity 0.4s ease-in-out;
    -webkit-transition: opacity 0.4s ease-in-out;
}

button#prev-img {
    left: 5%;
}

button#next-img {
    right: 5%;
}

button#close-btn {
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    text-align: center;
}

button#close-btn img {
    transition: transform 0.4s ease-in-out;
    -webkit-transition: transform 0.4s ease-in-out;
}

button#close-btn img:hover {
    transform: rotate(180deg);
    -webkit-transform: rotate(180deg);
}

@media screen and (max-width: 768px) {
    button.nav-btn {
        display: none;
    }

    button#close-btn img {
        margin-bottom: 2px;
    }

    button#close-btn {
        color: #eee;
        background-color: rgba(126, 126, 126, 0.4);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
}

/*平移动画*/
@-webkit-keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@-webkit-keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@-webkit-keyframes slideOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-100%); opacity: 0; }
}

@keyframes slideOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-100%); opacity: 0; }
}

@-webkit-keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.slide-out-right {
    -webkit-animation: slideOutRight 0.3s ease-in-out forwards;
            animation: slideOutRight 0.3s ease-in-out forwards;
}

.slide-in-left {
    -webkit-animation: slideInLeft 0.3s ease-in-out forwards;
            animation: slideInLeft 0.3s ease-in-out forwards;
}

.slide-out-left {
    -webkit-animation: slideOutLeft 0.3s ease-in-out forwards;
            animation: slideOutLeft 0.3s ease-in-out forwards;
}

.slide-in-right {
    -webkit-animation: slideInRight 0.3s ease-in-out forwards;
            animation: slideInRight 0.3s ease-in-out forwards;
}
